package com.chixing.util.redis;


/**
 * @author 马博
 * * @date 2021/11/3
 */
public class RedisKeyUtils {
    //保存用户点赞数据的key
    public static final String MAP_KEY_USER_LIKED = "MAP_USER_LIKED";
    //保存用户被点赞数量的key
    public static final String MAP_KEY_USER_LIKED_COUNT = "MAP_USER_LIKED_COUNT";

    /**
     * 拼接被点赞的用户id和点赞的人的id作为key。格式 222222::333333
     * @param evaluateId 被点赞的人id
     * @param custId 点赞的人的id
     * @return
     */
    public static String getLikedKey(Integer evaluateId, Integer custId){
        String evaluateStr=evaluateId.toString();
        String custStr=custId.toString();
        StringBuilder builder = new StringBuilder();
        builder.append(evaluateStr);
        builder.append("::");
        builder.append(custStr);
//        builder.append("::");
//        builder.append(DateUtil.dateToString(prisedTime,DateUtil.DATE_PATTEN_YMDHMS));
        return builder.toString();
    }
}
